﻿using System.Windows.Forms;
using UniMana.Data;
using UniMana.Utils.Controls;
namespace UniMana.Win.Training
{
    public partial class FrmSchedule : DevExpress.XtraEditors.XtraForm
    {
        private bool isDragging = false;
        private DBMain m_DBMain = new DBMain();
        private bds m_bdsPersonel;
        private bds m_bdsRoom;
        public FrmSchedule()
        {
            InitializeComponent();
            LoadData();
            xucWeek week = new xucWeek();
            this.xtraScrollableControl1.Controls.Add(week);
            week.Dock = DockStyle.Fill;
            week.OnAddClass += new xucWeek.onAddClass(Event);
            this.ShowInTaskbar = false;
        }

        private void LoadData()
        {
            this.m_bdsPersonel = new bds();
            this.m_bdsPersonel.DataSource = m_DBMain.m_DCReadOnly.Personnel_Personnels.GetListTeacher();
            this.m_bdsRoom = new bds();
            this.m_bdsRoom.DataSource = m_DBMain.m_DCReadOnly.Training_Class_Rooms;
        }

        public void Event(xucClass a)
        {
            //a.gluPersonnel_Personnel.Properties.DataSource = this.m_bdsPersonel;
            //a.gluTraining_Class_Room.Properties.DataSource = this.m_bdsRoom;
        }

    }
}